<template>
  <el-form-item ref="select">
    <el-select v-model="form.region" placeholder="请选择活动区域">
      <el-option v-for="item in selectData" :key="item.id" label="item.name">{{ item.name }}<el-option />
      </el-option></el-select>
  </el-form-item>
</template>
<script>
export default {
  name: 'MySelect',
  props: {
    title: {
      type: String,
      default: '标题'
    },
    placeholder: {
      type: String,
      default: '区域'
    }
  },
  data() {
    return {
      titleText: this.title,
      form: {
        region: ''
      },
      selectData: [
        { name: '区域一', id: 1 },
        { name: '区域2', id: 2 },
        { name: '区域3', id: 3 },
        { name: '区域4', id: 4 },
        { name: '区域5', id: 5 }
      ]
    }
  },
  mounted() {
    this.initUI()
  },
  methods: {
    initUI() {
      this.$refs.select.label = this.title
    },
    onSubmit() {
      console.log('submit!')
    }
  }
}
</script>
<style scoped>
</style>
